
<table id="adminListTable" cellpadding="5" cellspacing="0">
	{foreach from=$article_list item=article_item}
		{assign var="articleStatusText" value=""}
		{assign var="articleStatus" value="green"}
		
		{if $article_item.date_ts < $smarty.now && $article_item.published == 0}
			{assign var="articleStatusText" value="ist nicht freigegeben"}
			{assign var="articleStatus" value="red"}		
		{/if}
		{if $article_item.date_ts > $smarty.now && $article_item.published == 0}
			{assign var="articleStatusText" value="ist in Bearbeitung"}
			{assign var="articleStatus" value="gray"}		
		{/if}
		{if $article_item.date_ts > $smarty.now && $article_item.published == 1}
			{assign var="articleStatusText" value="wird veröffentlicht"}
			{assign var="articleStatus" value="yellow"}		
		{/if}
		<tr>
			<td>
				<div class="adminListTitle"
					style="background-image: url('/themes/admin/img/{$articleStatus}.gif');">
					<small>{$article_item.date|date_format:"%d.%m.%Y"}</small> <b>{$article_item.title}</b> 
					<small>{$articleStatusText}</small>
				</div>
			</td>
			<td class="adminListAction adminListActionEdit">
				<a href="?view={$view}&action=edit&item={$article_item.url}">Bearbeiten</a>
			</td>
			<td class="adminListAction adminListActionDelete">
				<a href="#" onclick="javascript:deleteItem('{$article_item.title}','{$view}','{$article_item.url}');">Löschen</a>
			</td>
		</tr>
	{/foreach}
</table>
